package com.wyfx.blockchain.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @Description
 * @Auther: wsm
 * @Date: 2020/9/3 14:24
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Block implements Serializable {

    private static final long serialVersionUID = 3577991841639149037L;

    /**
     * 区块索引号
     */
    private int index;
    /**
     * 当前区块的hash值,区块唯一标识
     */
    private String hash;
    /**
     * 生成区块的时间戳
     */
    private long timestamp;
    /**
     * 当前区块的交易集合
     */
    private String data;

    /**
     * 前一个区块的hash值
     */
    private String previousHash;

}
